#!/bin/bash
# Copyright (c) 2010, Sean A.O. Harney <sharney3@gmail.com>

DEFAULT_OMF="/usr/local/bin/omf"

if [ $# -ne 1 ] ; then
	echo -e "Usage:\t$0 <output file>";
	exit 1 ;
fi

OUTPUT_FILE="$1" ;

if [ -e "${OUTPUT_FILE}" ] ; then
	echo "Cannot proceed, ${OUTPUT_FILE} already exists." ;
	exit 1 ;
fi

touch "${OUTPUT_FILE}" ; # should create the file.
if [ $? -ne 0 ] ; then
	echo "Cannot proceed, failed to create ${OUTPUT_FILE} ." ;
	exit 1 ;
fi

FIRST_LINE="#!${DEFAULT_OMF}" ; # Add the pound-hash.

rm -f "${TMP_FILE}" ;
echo "Changed ${FIRST_LINE} to ${NEW_FIRST_LINE}" ;
echo "${SCRIPT_FILE} has been successfully modified." ;
exit 0 ;

echo "Enter a regex pattern: " ;
read IN_PATTERN ;

echo "Enter upper bound on length of strings generated from pattern: ";
read IN_PATTERN_LEN ;

